import { View } from "../../../mvc/core/View";
import { ObjCreate } from "../common/ObjCreate";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { Cache } from "../../cache/Cache";
import { Language } from "../../../../extend/language/Language";
type int = number;
//class FightSpiritAttView
    
    export  class FightSpiritAttView extends View
    {
        constructor()
        {
            super();
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            this._attTx = ObjCreate.createTextField("", 1, 1, 202, 160, this, GlobalStyle.textFormat6);
            this._attTx.multiline = true;
            this._attTx.wordWrap = true;
            return;
        }

        public processData(arg1: Array<any>, arg2: int, arg3: int): void
        {
            var loc1=null;
            var loc4=0;
            var loc5=0;
            var loc7=0;
            var loc2=Cache.instance.fightSpirit.getCurAddPrecentShow(arg2, arg3);
            var loc3=Language.getStringByParam(71114, loc2 / 100);
            var loc6=0;
            while (loc6 < arg1.length) 
            {
                loc1 = arg1[loc6];
                loc4 = 0;
                loc5 = 0;
                loc7 = 0;
                while (loc7 < loc1.value.length) 
                {
                    loc4 = loc4 + loc1.value[loc7];
                    loc5 = loc5 + Math.floor(loc1.value[loc7] * loc2 / 10000);
                    ++loc7;
                }
                loc3 = loc3 + ("<font color=\'#B1efff\'>  " + loc1.name + "： " + loc4 + "</font>" + "   +   " + "<font color=\'#00ff00\'>" + loc5 + "</font>" + "<br>");
                ++loc6;
            }
            this._attTx.htmlText = "<textFormat leading=\'7\'>" + loc3 + "</textFormat>";
            return;
        }

        /* internal */ /* var */_attTx: Object /* flash.text.TextField */;
    }
